import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import { baseCfg, pluginCfg } from './vite-config'
export default async ({ mode }) => {
	const { VITE_BASE_URL, VITE_BASE } = loadEnv(mode, process.cwd())
	console.log(VITE_BASE)
	return defineConfig({
		...baseCfg({ VITE_BASE_URL }),
		 base: '/h5-project/dist',
		plugins: [vue(), ...(await pluginCfg({ VITE_BASE_URL }))]
	})
}
